<?php
namespace app\admin\daoimp;
use app\admin\dao\LoginDaoI;
use think\Db;
use app\admin\pojo\Logins;
class LoginDaoImp implements LoginDaoI{
    /**
     * {@inheritDoc}
     * @see \app\admin\dao\LoginDaoI::login()
     */
    public function login(Logins $login)
    {
      
       $res=Db::table('zx_admin')->where('username',$login->getUsername())
       ->find();
       if(!isset($res)||$res['password']!=md5($login->getPassword()))
       {
           return false;
       }else {
           return true;
       }
   
        
    }
    

    /**
     * {@inheritDoc}
     * @see \app\admin\dao\LoginDaoI::loginout()
     */
    public function loginout()
    {
        // TODO Auto-generated method stub
        
    }

    
}